﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterNhanSuTienLuong.Master" Inherits="System.Web.Mvc.ViewPage<DTTB.MV2.QUANLYNHANSUTIENLUONG.Models.FormBean.NhanVienModel.NhanVienForm>" %>

<%@ Import Namespace="DTTB.MV2.QUANLYNHANSUTIENLUONG.Models.LinQ.NhanVien" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
     <script language="javascript" type="text/javascript">
       $(document).ready(function () {
           selectMenu("NhanVien-DanhSachNhanVien");
           $("#NhanVien-DanhSachNhanVien").parent().attr("class", "active");
       });
      
        </script>
      <script type="text/javascript" language="javascript" src="<%= ResolveUrl("~/Content/Scripts/NhanVien/NhanVien.js") %>"></script>
      <form id="form" action="#">
           <div class="box">
       <%-- <div class="title">
            <h5>&nbsp;Danh sách nhân viên</h5>
        </div>--%>
           <div class="breadcrumbs">
          <ul>
            <li class="home"><a href="">Quản lý nhân viên</a></li>
            <li><a href="">Danh sách nhân viên</a></li>
            <li>Page</li>
          </ul>
        </div>
        <div class="headlines">
            <h2>
                <span>Danh sách nhân viên</span>
            </h2>
             <%--   <a class="show-filter" href="#">show filter</a>--%>
        </div>
    
        <div style="padding-left: 30px;">
          <div style="display: inline;">
                        Tìm kiếm
                    </div>
                    <select style="display: inline" name="SearchObject" id="SearchObject">
                         <option value="SoThe" <% if(Model.SearchObject == "SoThe") { %>
                            selected="selected" <% } %>>Số thẻ</option>
                        <option value="HoTen" <% if(Model.SearchObject == "HoTen") { %> selected="selected"
                            <% } %>>Họ Tên</option>
                        <option value="SoCMND" <% if(Model.SearchObject == "SoCMND") { %> selected="selected"
                            <% } %>>Số CMND</option>
                        <option value="ChucVu" <% if(Model.SearchObject == "ChucVu") { %> selected="selected"
                            <% } %>>Chức vụ</option>
                        <option value="NoiSinh" <% if(Model.SearchObject == "NoiSinh") { %>
                            selected="selected" <% } %>>Nơi Sinh</option>
                      
                    </select>
                    <input type="text" id="SearchInput" name="SearchInput" value="<%= Model.SearchInput %>"
                        style="display: inline; width: 300px" onkeypress="javascript:return keypressforQuickSearch(event, 'NhanVien', 'DanhSachNhanVien'
                            , $('#SearchObject').val(), $('#SearchInput').val(), 1)" />
                    <img onclick="javascript:DoSearch();" style="vertical-align: middle; cursor: pointer"
                        src="<%=ResolveUrl("~/Content/ImagesAdmin/search_icon.gif")%>" alt="Tìm kiếm"
                        title="Tìm kiếm " />
               <input type="button" value="Thêm mới nhân viên" onclick="javascript:DoOpenNew();" />
          
          </div>

      <table class="table_outsite" style="width: 100%">
            <tr>
                <td colspan="2">
                    <div id="Message" style="font-size: 12px; color: Blue; font-weight: bold">
                        <%=Model.Message%>
                    </div>
                    <div id="MessageError" style="font-size: 12px; color: Red; font-weight: bold">
                        <%=Model.MessageError%>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="text-align: left">
                </td>
                <td align="right">
                   <%-- <input type="button" value="Xóa" onclick="javascript:DoDelete();" />--%>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <table class="tab tab-drag">
                        <thead>
                            <tr class="top nodrop nodrag" style="font-weight: bold">
                                <td class="first" align="center">
                                    <strong> STT </strong>
                                </td>
                               <%-- <td>
                                </td>--%>
                                <td nowrap="nowrap" style="width: 15%">
                                    <strong>Số thẻ </strong>
                                </td>
                                <td nowrap="nowrap">
                                    <strong>Họ tên </strong>
                                </td>
                                <td nowrap="nowrap"style="width: 15%">
                                    <strong>Ngày vào làm </strong>
                                </td>
                                <td nowrap="nowrap"style="width: 15%">
                                    <strong>Chức vụ </strong>
                                </td>
                                <td nowrap="nowrap" class="last"style="width: 15%">
                                    <strong>Thêm chi tiết </strong>
                                </td>
                            </tr>
                        </thead>
                        <tbody>
                            <% 
                                int stt = (Model.Pagenumber - 1) * DTTB.Common.CommonVariables.PaggedItemsPerPage + 1;
                                foreach (hs_NhanVien item in Model.NhanVienPagedList)
                                {
                            %>
                            <tr class="odd">
                                <td align="center" class="first">
                                    <%= stt %>
                                </td>
                               <%-- <td>
                                    <% if (item.IsDuyet == false)
                                       { %>
                                    <input type="checkbox" name="chk" value="<%=item.Id %>" />
                                    <% } %>
                                </td>--%>
                                <td style="width: 15%">
                                    <a  onclick="javascript:DoViewDetail(<%= item.Id %>)">
                                        <%= item.SoThe %>
                                    </a>
                                </td>
                                <td>
                                    <span >
                                        <%= item.Ho+" "+item.Ten%>
                                    </span>
                                </td>
                                <td style="width: 15%">
                                    <span >
                                        <%= string.Format("{0:dd/MM/yyyy}",item.NgayVaoLam) %>
                                    </span>
                                </td>
                                <td style="width: 15%">
                                    <span >
                                        <%= item.TB_JobTitle.JobTitle %>
                                    </span>
                                </td>
                               <td style="width: 15%">
                                    <span >
                                         <a href='<%=ResolveUrl("~/NhanVien/ThongTinChiTiet/" + item.Id.ToString()+"?HidLastTab=1&&Status=-1" ) %>'> Thêm</a>
                                    </span>
                                </td>
                            </tr>
                            <%
                            stt++;}
                            %>
                        </tbody>
                        <tfoot>
                            <tr class="border_bottom">
                                <td class="first" style="background: #DDDDDD">
                                </td>
                                <td class="last" colspan="6" align="right" style="background: #DDDDDD; padding-right: 10px">
                                    <%
                                        PagerOptions pagerOptions = new PagerOptions();
                                        DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate.CommonDelegate CommonDelegate= new  DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate.CommonDelegate();
                                        CommonDelegate.ChangeTextPaging(pagerOptions, "id");
                                    %>
                                    
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                    
                    <div class="pagination">
                                        <%=Html.Pager(Model.NhanVienPagedList, pagerOptions, new object())%>
                                    <%=Html.Hidden("Pagenumber", Model.Pagenumber)%>
                        
                        
                    </div>
                </td>
            </tr>
        </table>
        </div>
        </form>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    
</asp:Content>
